Functions


Adding and Replacing Items in a Collection

AddCollectionItem Adds a new item to a collection or to replace an existing item in a collection.
ReplaceIndexedCollectionItem Replaces the variable-length data of an item in a collection given the item’s index.

Cloning and Copying Collection Objects

CloneCollection Clones a collection object—that is, increment its owner count.
CopyCollection Creates a copy of an existing collection.
CountCollectionOwners Determines the number of existing references to a collection object.

Counting Items in a Collection

CountCollectionItems Determines the total number of items in a collection.
CountTaggedCollectionItems Obtains the total number of items in a collection that have a specified collection tag.

Creating and Disposing of Collection Objects

DisposeCollection Disposes of a collection object.
NewCollection Creates a new, empty collection object.

Editing Item Attributes

SetCollectionItemInfo Edits the attributes of a specific collection item given the item’s collection tag and collection ID.
SetIndexedCollectionItemInfo Edits the attributes of a specific collection item given the item’s collection index.

Flattening and Unflattening a Collection

FlattenCollection Converts a collection object into a stream format suitable for storing and unflattening.
FlattenPartialCollection Converts a collection object into a stream format suitable for storage and unflattening.
UnflattenCollection Unflattens a collection that was flattened using the FlattenCollection or FlattenPartialCollection function.

Getting Information About Collection Tags

CollectionTagExists Determines whether any of the items in a specified collection contain a specified collection tag.
CountCollectionTags Determines the number of distinct collection tags contained by the items of a specified collection.
GetIndexedCollectionTag Examines a specific collection tag contained in a collection.

Getting Information About a Collection Item

GetCollectionItemInfo Obtains information about a specific collection item given the item’s collection tag and collection ID.
GetIndexedCollectionItemInfo Obtains information about a specific collection item given the item’s collection index.
GetTaggedCollectionItemInfo Obtains information about a specific collection item given the item’s collection tag and tag list position.

Getting and Setting the Default Attributes for a Collection

GetCollectionDefaultAttributes Examines the default attributes of a collection object.
SetCollectionDefaultAttributes Alters the default attributes of a collection object.

Getting and Setting the Exception Procedure for a Collection

GetCollectionExceptionProc Obtains a pointer to the exception procedure installed in a specified collection.
SetCollectionExceptionProc Installs an exception procedure in a collection object.

Reading Collections From Resource Files

GetNewCollection Reads a collection in from a collection ('cltn') resource.

Removing Items From a Collection

EmptyCollection Removes every item in a collection.
PurgeCollection Removes all items in a collection whose attributes match a specified pattern.
PurgeCollectionTag Removes all items with a specific collection tag from a collection.
RemoveCollectionItem Removes an item from a collection given the item’s associated collection tag and collection ID.
RemoveIndexedCollectionItem Removes an item from a collection given the item’s index.

Retrieving the Variable-Length Data From an Item

GetCollectionItem Obtains a copy of the variable-length data associated with a collection item given the item’s collection tag and collection ID.
GetIndexedCollectionItem Obtains a copy of the variable-length data associated with a collection item given the item’s collection index.
GetTaggedCollectionItem Obtains a copy of the variable-length data associated with a collection item given the item’s collection tag and tag list position.

Working With Macintosh Memory Manager Handles

AddCollectionItemHdl Adds a new item to a collection or to replace an existing item in a collection, specifying the item’s variable-length data using a handle rather than a pointer and a data size.
FlattenCollectionToHdl Flattens a collection into a Macintosh Memory Manager handle.
GetCollectionItemHdl Obtains a copy of the variable-length data associated with a collection item given the item’s collection tag and collection ID.
GetIndexedCollectionItemHdl Copies the variable-length data associated with a collection item into a Macintosh Memory Manager handle, given the item’s collection index.
ReplaceIndexedCollectionItemHdl Replaces the variable-length data of an item in a collection given the item’s collection index, specifying the item’s new variable-length data using a handle rather than a pointer and a data size.
UnflattenCollectionFromHdl Unflattens a collection that was flattened using the FlattenCollectionToHdl utility function.

Miscellaneous

CallCollectionExceptionProc
CallCollectionFlattenProc
DisposeCollectionExceptionUPP
DisposeCollectionFlattenUPP
InvokeCollectionExceptionUPP
InvokeCollectionFlattenUPP
NewCollectionExceptionProc
NewCollectionExceptionUPP
NewCollectionFlattenProc
NewCollectionFlattenUPP

© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)